package com.xiaoge.system.controller;


import com.xiaoge.response.Result;
import com.xiaoge.system.entity.User;
import com.xiaoge.system.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @author xiaoge
 * @since 2021-12-09
 */
@RestController
@RequestMapping("/system/user")
@Api(value = "用户管理")
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("/findUsers")
    @ApiOperation(value = "查询所以的用户信息",notes = "")
    public Result findUsers(){
        List<User> list = userService.list();
        return Result.ok().data("users",list);
    }

}

